import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;

import org.junit.Test;

public class XMLTest {
	@Test
	public void xmlTest() {
		String s = "D:/Android/JuSheTuan_AD/res/layout/cus_activity_box.xml";
		File file = new File("D:/code/generatedCode.txt");
		file.setWritable(true);
		try {
			FileWriter writer = new FileWriter(file);
			writer.write(FindViewUtils.getViewAnnotion(s) + "\n" + 
						FindViewUtils.findView(s));
			writer.flush();
			System.out.println("fuck over");
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
